Enable ICF on Linux#129762
Conversation
Opening to see CI results and size diffs
|
@am11 Since I think you worked in this area the most, what do you think about this? It seems that the GCC build job failed cause Do the official builds use Also, it seems like NativeAOT doesn't use the flags from here. |
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
|
@MichalStrehovsky, experimented with it earlier. We may need changes from #87045. |
My intent here was to only enable it for native code in the runtime, I'd leave the handling of NAOT outputs to @MichalStrehovsky. |
|
Do you see any size difference before/after on linux? $ ./build.sh clr+libs -c Release
$ find artifacts/bin/coreclr/linux.x64.Release -name '*.so*' -exec du -sh {} \; |
I currently do not have a Linux machine on hand to test it, that's why I wanted to see how it impacts rt-sz. |
|
|
@am11 Can you show the total without Also, it seems like emscripten doesn't support icf even with lld, what's the proper condition for excluding that? |
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
| |
|
captured befroe.md and after.md with this:
then asked AI to compute deltas (which used python script). |
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
|
/azp run runtime-coreclr outerloop, runtime-extra-platforms |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Failures all unrelated, either non Linux or networking errors. |
|
@jkotas Do you know who'd be the right person to review this? |
|
This change is not risk-free. We have the equivalent option enabled on Windows, and copilot is not able to find any dependencies on the pointer equality behavior in non-Windows code, so the risk should be acceptable. |
|
Thanks! |
CI is green and it saves on average 2% in size.